<div ng-controller="AdminStaffCtrl as vm">
    <section class="content-header">
        <!-- Content Header (Page header) -->
        Staffing Report
        <ol class="breadcrumb">
            <li><a ><i class="fa fa-dashboard"></i> HR - Staffing</a></li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title">Staffing summary report</h3>
                        <div class="pull-right">
                            <form class="form-inline">
                                <div class="form-group">
                                    <select class="form-control" ng-options="div for div in years track by div" ng-model="vm.year" ng-change="vm.loadData()">
                                    </select>
                                </div>
                                <div class="form-group">
                                    <select class="form-control" ng-options="div for div in months track by div" ng-model="vm.month" ng-change="vm.loadData()">
                                    </select>
                                </div>
                                <div class="form-group">
                                    <select class="form-control" ng-options="div.name for div in regions track by div.id" ng-model="vm.region" ng-change="vm.regionChange()">
                                        <option ng-if="role!='Sub-Region Admin'" value="">--- Sub-Region ---</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <select class="form-control" ng-options="div.name for div in clusters track by div.id" ng-model="vm.cluster" ng-change="vm.loadData()">
                                        <option value="">--- Cluster ---</option>
                                    </select>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="box-body table-responsive no-padding">
                        <table ng-table="vm.tableParams" class="table table-hover table-bordered table-condensed" show-filter="true">
                            <tr ng-repeat="ret in $data">
                                <td width="200px" title="'Hotel Name'" filter="{ hotel: 'text'}" sortable="'hotel'">
                                    {{ret.hotel}}</td>
                                <td title="'Manning Budget of This Year'" filter="{ 'mb': 'text'}" sortable="'mb'">
                                    {{ret.mb}}</td>
                                <td title="'Beginning of this Month'" filter="{ 'begin': 'text'}" sortable="'begin'">
                                    {{ret.begin}}</td>
                                <td title="'New Hire'" filter="{ 'newHire': 'text'}" sortable="'newHire'">
                                    {{ret.newHire}}</td>
                                <td title="'Transfer Ins'" filter="{ 'transferIn': 'text'}" sortable="'transferIn'">
                                    {{ret.transferIn}}</td>
                                <td title="'Separation on MTD'" filter="{ 'seperationMtd': 'text'}" sortable="'seperationMtd'">
                                    {{ret.seperationMtd}}</td>
                                <td title="'Separation on YTD'" filter="{ 'seperationYtd': 'text'}" sortable="'seperationYtd'">
                                    {{ret.seperationYtd}}</td>
                                <td title="'End of this Month Nos MTD'" filter="{ 'endMtd': 'text'}" sortable="'endMtd'">
                                    {{ret.endMtd}}</td>
                                <td title="'End of this Month Turnover% MTD'" filter="{ 'endMtdP': 'text'}" sortable="'endMtdP'">
                                    {{ret.endMtdP*100 |percentage}}</td>
                                <td title="'End of this Month Average YTD Staff Number'" filter="{ 'endYtd': 'text'}" sortable="'endYtd'">
                                    {{ret.endYtd}}</td>
                                <td title="'End of this Month Turnover% YTD'" filter="{ 'endYtdP': 'text'}" sortable="'endYtdP'">
                                    {{ret.endYtdP*100 |percentage}}</td>
                                <td title="'Transfer/ Promotions Nos Within Hotels MTD'" filter="{ 'promotionMtd': 'text'}" sortable="'promotionMtd'">
                                    {{ret.promotionMtd}}</td>
                                <td title="'Transfer/ Promotions % Within Hotels MTD'" filter="{ 'promtionMtdP': 'text'}" sortable="'promtionMtdP'">
                                    {{ret.promtionMtdP*100 |percentage}}</td>
                                <td title="'Transfer to Sisters Hotel Transfer Nos YTD'" filter="{ 'transferToYtd': 'text'}" sortable="'transferToYtd'">
                                    {{ret.transferToYtd}}</td>
                                <td title="'Transfer to Sisters Hotel Transfer % YTD'" filter="{ 'transferToYtdP': 'text'}" sortable="'transferToYtdP'">
                                    {{ret.transferToYtdP*100 |percentage}}</td>
                                <td title="'Overall Staffing This Month'" filter="{ 'overall': 'text'}" sortable="'overall'">
                                    {{ret.overall}}</td>
                                <td title="'EFTE'" filter="{ 'efte': 'text'}" sortable="'efte'">
                                    {{ret.efte}}</td>
                                <td title="'Staff Ratio (Headcount/Available rooms)'" filter="{ 'staffRatio': 'text'}" sortable="'staffRatio'">
                                    {{ret.staffRatio}}</td>
                                <td title="'Revenue/EFTE (USD)'" filter="{ 'revenue': 'text'}" sortable="'revenue'">
                                    {{ret.revenue}}</td>
                                <td title="'Labor cost/Revenue %'" filter="{ 'pter': 'text'}" sortable="'pter'">
                                    {{ret.pter | percentage}}</td>
                                <td title="'EFTE/Available rooms'" filter="{ 'rootRate': 'text'}" sortable="'rootRate'">
                                    {{ret.rootRate}}</td>
                            </tr>
                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
        </div>
    </section>
</div>
